﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace WebBarracoDoSom.Models
{
    public class CategoriasInitializer : DropCreateDatabaseIfModelChanges<CategoriaDBContext>
    {
        protected override void Seed(CategoriaDBContext context)
        {
            var categorias = new List<Categoria> {  new Categoria { ID = 1, 
                                                                    Nome = "",
                                                                    Multa = 0, 
                                                                    TempoEmprestimo = 0 }};


            categorias.ForEach(c => context.Categorias.Add(c));
        }
    }
}